package com.bjsxt.controller;

import com.bjsxt.pojo.Company;
import com.bjsxt.pojo.PageA;
import com.bjsxt.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/company")
public class CompanyController {

    @Autowired
    private CompanyService  companyService;

    @RequestMapping("/changeCompany")
    public  Integer  changeCompany(Company company){

        return   companyService.change(company);
    }



    @RequestMapping("/saveCompany")
    public   Integer   saveCompany(Company company){

        return  companyService.save(company);
    }


    @RequestMapping("/findMoreCompany")
    public PageA<Company>  findMoreCompany(Integer page,Integer rows,Company company){

        return  companyService.findMore(page, rows, company);
    }

}
